﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using QLVMBAYDatacess;

namespace QLVMBAY.UControl
{
    public partial class UcDSVeThapNhat : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadGiaVe();
            }
        }
        void LoadGiaVe()
        {
            var getList = ChiTietCBayDA.Inst.GetChuyenBayGiaThap(true);
            Literal1.Text = "";
            
            var temp="style='float:left;'";
            for (var ob=0 ;ob< getList.Count;ob++)
            {
                Literal1.Text += "<div class='type_GiaVe'"+temp+">"
    +"<h3 style='margin-bottom: 6px'>"+getList[ob].ItemChuyenBay.ItemTuyenBay.ItemSanBayDen.ItemThanhPho.TenThanhPho+"</h3>"
   +" <h6 style='margin-top: 6px;margin-bottom:6px;'>Giá 1 chiều</h6>"
    +"<h2 style='color:#F3A72F;margin-top:6px;margin-bottom:6px'>"+ getList[ob].GiaVe.ToString("#,##0") +" VNĐ</h2>"
    +"<h5 style='margin-top: 6px;margin-bottom:6px;'>Khởi hành từ "+getList[ob].ItemChuyenBay.ItemTuyenBay.ItemSanBayDi.ItemThanhPho.TenThanhPho+"</h5></div> ";
                ////if (ob == 3)
                ////    temp = "";
                ////else
                ////    temp = "style='float:left;'";

            }
 
        }
    }
}